
#include "app_config.h"
#include "tim.h"
#include "stdint.h"
#include "stdio.h"

#ifdef GPIO_PWM

void drv_pwm_tim_handle(void);

void drv_g_pwm_start(uint8_t pwm_channel, uint16_t duration, uint16_t period, uint8_t duty_cycle);

void drv_g_pwm_stop(uint8_t pwm_channel);

#endif


#ifdef TIM_PWM
// 说明: PWM 时钟默认1Mhz

#define PWM_TIMER htim3

extern TIM_HandleTypeDef htim3;
extern uint8_t pwm_status[2];  

void drv_pwm_start(uint32_t channel, uint8_t duty_cycle, uint32_t duration);

void drv_pwm_stop(uint32_t channel);

void drv_pwm_init(uint32_t frequency);

void drv_pwm_interrupt_handle(void);

#endif

